<?php
class Tv_Arte_Tree_Renderers_Main extends Tv_Arte_Tree_Std_Renderer
{
    public function getNodeStart()
    {
        return "<ul>";
    }
    public function getNodeContentStart()
    {
        return "<li>";
    }
    protected function _getNodeContent()
    {
        $componentData = $this->getIterator()->getComponentData();
        $data = $componentData->getData();
        if (!$this->_hasUrlSet()) {
            $url = ROOT_HTTP . '/public/admin/medias/folder/id/' . $data['id'];
        } else {
            $url = $this->_buildUrl($data);
        }
        return sprintf('<a rel="ajax-html:.ui-layout-center-1" href="%s">%s</a>', 
            $url, 
            $data['label']
        );
    }
    public function getNodeContentEnd()
    {
        return "</li>";
    }
    public function getNodeEnd()
    {
        return "</ul>";
    }
}